home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Networking / OTLLCTest / NegotiateRawModeSample.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-09-13  |  1.7 KB  |  99 lines  |  [TEXT/CWIE]

  1. /*
  2.     File NegotiateRawModeSample.h
  3.     
  4.     By rich kubota
  5.     Developer Technical Support
  6.     December 11, 1997
  7.     
  8. */
  9.  
  10. #ifndef __NEGOTIATERAWMODESAMPLE__
  11. #define __NEGOTIATERAWMODESAMPLE__
  12.  
  13. #include <Types.h>
  14. #include "OpenTransport.h"
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20. #if PRAGMA_ALIGN_SUPPORTED
  21. #pragma options align=mac68k
  22. #endif
  23.  
  24. #if PRAGMA_IMPORT_SUPPORTED
  25. #pragma import on
  26. #endif
  27.  
  28. enum
  29. {
  30.     kOTVers12    = 0x01208000
  31. };
  32.  
  33. enum
  34. {
  35.     kUnknownTemplate     = 0x00,
  36.     kOrigTemplate,
  37.     kMentatTemplate
  38. };
  39.  
  40. /* Flags for various structures. */
  41.  
  42. enum
  43. {
  44.     DL_NORMAL_STATUS    = 0x01,
  45.     DL_ERROR_STATUS        = 0x02,
  46.     DL_TRUNCATED_PACKET    = 0x04,
  47.     DL_VERSION            = 0x00,
  48.     DL_VERSION_BITS        = 0xF0000000
  49. };
  50.  
  51. /*
  52.  * Receive and send error flags, these should not overlap with other
  53.  * flags above.
  54.  */
  55. enum
  56. {
  57.     DL_CRC_ERROR        = 0x10,
  58.     DL_RUNT_ERROR        = 0x20,
  59.     DL_FRAMING_ERROR    = 0x40,
  60.     DL_BAD_802_3_LENGTH    = 0x80,
  61.     DL_ERROR_MASK        = DL_CRC_ERROR | DL_RUNT_ERROR | DL_FRAMING_ERROR | DL_BAD_802_3_LENGTH
  62. };
  63.  
  64. /* Input and output structure for I_OTSetRawMode kOTSetRecvMode ioctl. */
  65. struct dl_recv_control_t {
  66.     unsigned long    dl_primitive;
  67.     unsigned long    dl_flags;
  68.     unsigned long    dl_truncation_length;
  69. };
  70.  
  71. typedef struct dl_recv_control_t dl_recv_control_t;
  72.  
  73.  
  74. struct dl_recv_status_t {
  75. unsigned long    dl_overall_length;
  76. unsigned long    dl_flags;
  77. unsigned long    dl_packet_length_before_truncation;
  78. unsigned long    dl_pad;
  79. OTTimeStamp        dl_timestamp;
  80. };
  81.  
  82. typedef struct dl_recv_status_t dl_recv_status_t;
  83.  
  84. extern pascal OSStatus DoNegotiateRawModeOption(EndpointRef ep, 
  85.                                                 UInt32 rawModeOption,
  86.                                                 UInt32 *templateType);
  87.  
  88. #if PRAGMA_ALIGN_SUPPORTED
  89. #pragma options align=reset
  90. #endif
  91. #if PRAGMA_IMPORT_SUPPORTED
  92. #pragma import off
  93. #endif
  94.  
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98.  
  99. #endif    // __NEGOTIATERAWMODESAMPLE__